/*
 字符串的处理
 */
#include<stdio.h>
#include<string.h>
int main (){
	char str[20] = "hello";
	char str1[10] = "world";
	printf("str = %sstr1=%s\n",str,str1);
	//strncpy(str,str1,2);
	//strncat(str,str1,2);
	if(strncmp(str,str1,2) <0){
		printf("第二个字符串大\n");
	}
	else if(strncmp(str,str1,2)>0){
		printf("第一个字符串大\n");	
	}else{
		printf("二个字符一样大\n");
	}
	printf("处理之后str = %s\n",str);
	return 0;
}
